var accountInfo = [];
{% for id, account in accounts %}
    accountInfo[{{ id }}] = {preferredCurrency: {{ account.preferredCurrency }}, name: "{{ account.name }}"};
{% endfor %}
